package com.shenmazong.user.controller;

import com.shenmazong.utils.ResultResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 军哥
 * @version 1.0
 * @description: TODO
 * @date 2022/7/4 11:00
 */

@RestController
@Slf4j
@RefreshScope
@RequestMapping(value = "/config")
public class NacosConfigController {

    @Value("${site.message}")
    private String message;

    @PostMapping(value = "/config")
    public ResultResponse config() {
        System.out.println(message);

        return ResultResponse.SUCCESS(message);
    }

}
